/*
** StopWatch
**
** Encapsulates calls to the performance timers
**		StopWatch::Instance()->GetDeltaT() returns the amount
**		of time (in seconds) since it was Last called
**
** Revision: %Id$
*/
#pragma once


/* Uses the Singleton design pattern */

class StopWatch
{
private:
	/*****************************************************\
	* Member variables                                    *
	\*****************************************************/
	double	secondsPerCount;	// conversion from counts to seconds
	__int64	then;				// when was this called previously?

	/*****************************************************\
	* Constructor and copy constructor are private        *
	\*****************************************************/
	StopWatch();							// private constructor
	StopWatch(const StopWatch& copyFromMe);	// private copy constructor


public:
	/*****************************************************\
	* Instance returns pointer to the singleton instance  *
	\*****************************************************/
	static StopWatch* Instance();

	/*****************************************************\
	* Destructor                                          *
	\*****************************************************/
	virtual ~StopWatch();

	/*****************************************************\
	* GetDeltaT returns elapsed time (seconds)            *
	\*****************************************************/
	double GetDeltaT();

	/*****************************************************\
	* Reset resets and restarts the timer                 *
	\*****************************************************/
	void Reset();
};
